package org.studle.services;

import org.studle.domain.*;
import org.studle.data.*;

public class EventService {
	private static GenericDAO<String, Event> eventDataAccessor = new GenericDAO<String, Event>();

	public static void createEvent(String name, String description) {
		Event event = new Event(name, description);
		eventDataAccessor.createRecord(event.getID(), event);
	}

	public void updateEvent(Event event, String description, Person owner) {
		event.setDescription(description);
		event.addOwner(owner);
	}

	public void archiveEvent(Event event) {
		event.setExpired();
	}
	
}
